#include <stdio.h>

#define LINE_MAXIMUM 10  

int main()
{
    int i = 0, j = 0;
    int array[LINE_MAXIMUM][LINE_MAXIMUM] = { 0 };
    int k = 0;

    for (i = 0; i < LINE_MAXIMUM; i++) 
    {
        for (j = 0; j <= i; j++)    
        {
            if (j == 0 || j == i)   
                array[i][j] = 1;
            else                   
                array[i][j] = array[i - 1][j - 1]\
                + array[i - 1][j];
        }
    }
    for (i = 0; i < LINE_MAXIMUM; i++)
    {
        for (k = 1; k < LINE_MAXIMUM - i; k++)
            printf("  ");
        for (j = 0; j <= i; j++)
            printf("%3d ", array[i][j]);
        printf("\n");
    }
    return 0;
}
